{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>超市在线购物 - 现代智能收银系统</title>
    <!-- 引入Bootstrap CSS（本地静态文件） -->
    <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
    <!-- 引入Font Awesome（CDN） -->
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <!-- 自定义CSS -->
    <style>
        body {
            background-color: #f8f9fa;
            min-height: 100vh;
        }
        /* 头部样式 */
        .header {
            background-color: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        .navbar {
            padding: 0.75rem 0;
        }
        .logo {
            font-size: 1.5rem;
            font-weight: bold;
            color: #007bff;
            text-decoration: none;
        }
        .logo:hover {
            color: #0056b3;
        }
        .search-container {
            position: relative;
            max-width: 500px;
            width: 100%;
        }
        .search-input {
            width: 100%;
            padding: 0.5rem 2.5rem 0.5rem 1rem;
            border: 1px solid #ced4da;
            border-radius: 20px;
            transition: border-color 0.15s ease-in-out;
        }
        .search-input:focus {
            border-color: #007bff;
            outline: none;
        }
        .search-btn {
            position: absolute;
            right: 0.5rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: #6c757d;
        }
        .search-btn:hover {
            color: #007bff;
        }
        .nav-icon {
            color: #495057;
            font-size: 1.25rem;
            margin-left: 1.5rem;
            text-decoration: none;
            position: relative;
        }
        .nav-icon:hover {
            color: #007bff;
        }
        .nav-icon .badge {
            position: absolute;
            top: -0.5rem;
            right: -0.5rem;
            font-size: 0.6rem;
        }
        /* 轮播图样式 */
        .carousel {
            margin-bottom: 2rem;
        }
        .carousel-item img {
            height: 400px;
            object-fit: cover;
        }
        .carousel-caption {
            background: rgba(0, 0, 0, 0.5);
            border-radius: 8px;
            padding: 1rem;
            bottom: 2rem;
        }
        /* 商品卡片样式 */
        .product-card {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
            transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        }
        .product-image {
            height: 200px;
            overflow: hidden;
            border-top-left-radius: 8px;
            border-top-right-radius: 8px;
        }
        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            transition: transform 0.3s ease;
        }
        .product-card:hover .product-image img {
            transform: scale(1.05);
        }
        .product-body {
            padding: 1rem;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        .product-title {
            font-size: 1.1rem;
            font-weight: 500;
            margin-bottom: 0.5rem;
            color: #212529;
            height: 2.5rem;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .product-price {
            font-size: 1.25rem;
            font-weight: bold;
            color: #dc3545;
            margin-bottom: 0.5rem;
        }
        .product-rating {
            color: #ffc107;
            margin-bottom: 1rem;
        }
        .product-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: auto;
        }
        .add-to-cart-btn {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            transition: background-color 0.15s ease-in-out;
        }
        .add-to-cart-btn:hover {
            background-color: #0056b3;
        }
        .favorite-btn {
            background: none;
            border: 1px solid #ced4da;
            color: #6c757d;
            padding: 0.5rem;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease-in-out;
        }
        .favorite-btn:hover {
            border-color: #dc3545;
            color: #dc3545;
        }
        .favorite-btn.active {
            border-color: #dc3545;
            color: #dc3545;
            background-color: #fff3cd;
        }
        /* 页脚样式 */
        .footer {
            background-color: #2c3e50;
            color: white;
            padding: 2rem 0;
        }
        .footer-title {
            font-size: 1.25rem;
            font-weight: 500;
            margin-bottom: 1rem;
            color: white;
        }
        .footer-link {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            display: block;
            margin-bottom: 0.5rem;
            transition: color 0.15s ease-in-out;
        }
        .footer-link:hover {
            color: white;
        }
        .footer-social {
            display: flex;
        }
        .footer-social a {
            color: white;
            font-size: 1.25rem;
            margin-right: 1rem;
            transition: transform 0.15s ease-in-out;
        }
        .footer-social a:hover {
            transform: translateY(-3px);
        }
        .copyright {
            background-color: #1a252f;
            color: rgba(255, 255, 255, 0.7);
            padding: 1rem 0;
            text-align: center;
        }
        /* 响应式调整 */
        @media (max-width: 768px) {
            .carousel-item img {
                height: 250px;
            }
            .search-container {
                margin: 1rem 0;
            }
            .nav-icon {
                margin-left: 1rem;
                margin-right: 1rem;
            }
        }
        @media (max-width: 576px) {
            .carousel-item img {
                height: 200px;
            }
            .carousel-caption {
                padding: 0.5rem;
                bottom: 1rem;
            }
            .carousel-caption h5 {
                font-size: 1rem;
            }
            .carousel-caption p {
                font-size: 0.875rem;
                display: none;
            }
        }
    </style>
</head>
<body>
    <!-- 头部导航 -->
    <div class="header">
        <div class="container">
            <nav class="navbar navbar-expand-lg navbar-light">
                <!-- 网站标志 -->
                <a href="{% url 'shopping_home' %}" class="logo"><i class="fa fa-shopping-bag"></i> 超市在线购物</a>
                
                <!-- 移动端菜单按钮 -->
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="切换导航">
                    <span class="navbar-toggler-icon"></span>
                </button>
                
                <!-- 导航内容 -->
                <div class="collapse navbar-collapse" id="navbarContent">
                    <!-- 搜索框 -->
                    <div class="search-container mx-auto">
                        <input type="text" class="search-input" placeholder="搜索商品...">
                        <button class="search-btn">
                            <i class="fa fa-search"></i>
                        </button>
                    </div>
                    
                    <!-- 用户操作图标 -->
                    <div class="d-flex align-items-center">
                        <a href="#" class="nav-icon" title="分类">
                            <i class="fa fa-th-large"></i>
                        </a>
                        <a href="#" class="nav-icon" title="我的订单">
                            <i class="fa fa-list-alt"></i>
                        </a>
                        <a href="#" class="nav-icon" title="购物车">
                            <i class="fa fa-shopping-cart"></i>
                            <span class="badge bg-danger">3</span>
                        </a>
                        <a href="#" class="nav-icon" title="我的账户">
                            <i class="fa fa-user-circle"></i>
                        </a>
                    </div>
                </div>
            </nav>
        </div>
    </div>
    
    <!-- 主要内容区 -->
    <main class="main-content">
        <!-- 轮播图 -->
        <div class="carousel slide" id="homeCarousel" data-bs-ride="carousel">
            <div class="carousel-indicators">
                <button type="button" data-bs-target="#homeCarousel" data-bs-slide-to="0" class="active"></button>
                <button type="button" data-bs-target="#homeCarousel" data-bs-slide-to="1"></button>
                <button type="button" data-bs-target="#homeCarousel" data-bs-slide-to="2"></button>
            </div>
            <div class="carousel-inner">
                <div class="carousel-item active">
                    <img src="{% static 'img/banner1.jpg' %}" alt="促销活动" class="d-block w-100">
                    <div class="carousel-caption d-none d-md-block">
                        <h5>年终大促销</h5>
                        <p>全场商品低至5折，限时抢购！</p>
                        <a href="#" class="btn btn-primary">立即查看</a>
                    </div>
                </div>
                <div class="carousel-item">
                    <img src="{% static 'img/banner2.jpg' %}" alt="新品上市" class="d-block w-100">
                    <div class="carousel-caption d-none d-md-block">
                        <h5>新品上市</h5>
                        <p>多款新品等你来体验！</p>
                        <a href="#" class="btn btn-primary">了解详情</a>
                    </div>
                </div>
                <div class="carousel-item">
                    <img src="{% static 'img/banner3.jpg' %}" alt="会员专享" class="d-block w-100">
                    <div class="carousel-caption d-none d-md-block">
                        <h5>会员专享</h5>
                        <p>会员购物享双倍积分，更有专属优惠！</p>
                        <a href="#" class="btn btn-primary">会员中心</a>
                    </div>
                </div>
            </div>
            <button class="carousel-control-prev" type="button" data-bs-target="#homeCarousel" data-bs-slide="prev">
                <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                <span class="visually-hidden">上一张</span>
            </button>
            <button class="carousel-control-next" type="button" data-bs-target="#homeCarousel" data-bs-slide="next">
                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                <span class="visually-hidden">下一张</span>
            </button>
        </div>
        
        <!-- 分类导航 -->
        <div class="container mb-6">
            <div class="row">
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-primary text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-shopping-basket"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">全部商品</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-success text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-cutlery"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">食品饮料</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-warning text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-bath"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">个护美妆</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-danger text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-home"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">家居日用</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-info text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-child"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">母婴用品</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-secondary text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-heartbeat"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">保健品</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-primary text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-utensils"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">厨房用品</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-success text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-tshirt"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">服饰鞋包</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-warning text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-mobile-alt"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">数码电器</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-danger text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-gift"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">礼品鲜花</span>
                    </a>
                </div>
                <div class="col-2 col-sm-2 col-md-1 text-center mb-4">
                    <a href="#" class="category-link">
                        <div class="category-icon bg-info text-white rounded-circle w-12 h-12 mx-auto flex items-center justify-center">
                            <i class="fa fa-ellipsis-h"></i>
                        </div>
                        <span class="d-block mt-2 text-sm">更多分类</span>
                    </a>
                </div>
            </div>
        </div>
        
        <!-- 促销商品 -->
        <div class="container mb-6">
            <div class="section-header mb-4 d-flex justify-content-between align-items-center">
                <h2><i class="fa fa-fire"></i> 限时特惠</h2>
                <a href="#" class="text-primary">查看全部 <i class="fa fa-angle-right"></i></a>
            </div>
            <div class="row">
                <!-- 促销商品卡片 -->
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product1.jpg' %}" alt="可口可乐 330ml">
                            <div class="absolute top-0 left-0 bg-danger text-white text-xs px-2 py-1">限时5折</div>
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">可口可乐 330ml</h3>
                            <div class="product-price">¥1.75 <span class="text-muted text-sm line-through ml-1">¥3.50</span></div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-half-o"></i>
                                <span class="text-muted text-xs ml-1">4.5 (128)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product2.jpg' %}" alt="康师傅红烧牛肉面">
                            <div class="absolute top-0 left-0 bg-danger text-white text-xs px-2 py-1">限时6折</div>
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">康师傅红烧牛肉面</h3>
                            <div class="product-price">¥2.70 <span class="text-muted text-sm line-through ml-1">¥4.50</span></div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                                <span class="text-muted text-xs ml-1">4.0 (96)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product3.jpg' %}" alt="乐事薯片 原味 70g">
                            <div class="absolute top-0 left-0 bg-danger text-white text-xs px-2 py-1">限时7折</div>
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">乐事薯片 原味 70g</h3>
                            <div class="product-price">¥4.55 <span class="text-muted text-sm line-through ml-1">¥6.50</span></div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <span class="text-muted text-xs ml-1">5.0 (156)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product4.jpg' %}" alt="农夫山泉 550ml">
                            <div class="absolute top-0 left-0 bg-danger text-white text-xs px-2 py-1">限时8折</div>
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">农夫山泉 550ml</h3>
                            <div class="product-price">¥1.60 <span class="text-muted text-sm line-through ml-1">¥2.00</span></div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-half-o"></i>
                                <span class="text-muted text-xs ml-1">4.7 (235)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 热门推荐 -->
        <div class="container mb-6">
            <div class="section-header mb-4 d-flex justify-content-between align-items-center">
                <h2><i class="fa fa-thumbs-up"></i> 热门推荐</h2>
                <a href="#" class="text-primary">查看全部 <i class="fa fa-angle-right"></i></a>
            </div>
            <div class="row">
                <!-- 热门商品卡片 -->
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product5.jpg' %}" alt="德芙巧克力 42g">
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">德芙巧克力 42g</h3>
                            <div class="product-price">¥12.00</div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                                <span class="text-muted text-xs ml-1">4.2 (189)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product6.jpg' %}" alt="奥利奥饼干 原味 116g">
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">奥利奥饼干 原味 116g</h3>
                            <div class="product-price">¥8.50</div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-half-o"></i>
                                <span class="text-muted text-xs ml-1">4.6 (156)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product7.jpg' %}" alt="旺旺仙贝 52g">
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">旺旺仙贝 52g</h3>
                            <div class="product-price">¥5.00</div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                                <span class="text-muted text-xs ml-1">4.1 (132)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product8.jpg' %}" alt="统一绿茶 500ml">
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">统一绿茶 500ml</h3>
                            <div class="product-price">¥3.00</div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-half-o"></i>
                                <span class="text-muted text-xs ml-1">4.4 (208)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 新品上市 -->
        <div class="container mb-6">
            <div class="section-header mb-4 d-flex justify-content-between align-items-center">
                <h2><i class="fa fa-bell"></i> 新品上市</h2>
                <a href="#" class="text-primary">查看全部 <i class="fa fa-angle-right"></i></a>
            </div>
            <div class="row">
                <!-- 新品商品卡片 -->
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product9.jpg' %}" alt="脉动 青柠味 600ml">
                            <div class="absolute top-0 left-0 bg-success text-white text-xs px-2 py-1">新品</div>
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">脉动 青柠味 600ml</h3>
                            <div class="product-price">¥4.50</div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                                <span class="text-muted text-xs ml-1">4.0 (56)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product10.jpg' %}" alt="益达无糖口香糖 56g">
                            <div class="absolute top-0 left-0 bg-success text-white text-xs px-2 py-1">新品</div>
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">益达无糖口香糖 56g</h3>
                            <div class="product-price">¥15.00</div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-half-o"></i>
                                <span class="text-muted text-xs ml-1">4.5 (42)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product11.jpg' %}" alt="妙脆角 烧烤味 65g">
                            <div class="absolute top-0 left-0 bg-success text-white text-xs px-2 py-1">新品</div>
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">妙脆角 烧烤味 65g</h3>
                            <div class="product-price">¥7.50</div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                                <span class="text-muted text-xs ml-1">4.2 (36)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 col-6 mb-4">
                    <div class="product-card">
                        <div class="product-image">
                            <img src="{% static 'img/product12.jpg' %}" alt="洽洽瓜子 原味 160g">
                            <div class="absolute top-0 left-0 bg-success text-white text-xs px-2 py-1">新品</div>
                        </div>
                        <div class="product-body">
                            <h3 class="product-title">洽洽瓜子 原味 160g</h3>
                            <div class="product-price">¥9.90</div>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-half-o"></i>
                                <span class="text-muted text-xs ml-1">4.6 (48)</span>
                            </div>
                            <div class="product-footer">
                                <button class="add-to-cart-btn">加入购物车</button>
                                <button class="favorite-btn">
                                    <i class="fa fa-heart-o"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
    
    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <div class="row">
                <div class="col-md-3 mb-4">
                    <h3 class="footer-title"><i class="fa fa-info-circle"></i> 关于我们</h3>
                    <p class="text-sm text-muted mb-3">现代智能收银系统是一家专注于超市管理的科技公司，致力于为商家提供全方位的管理解决方案。</p>
                    <div class="footer-social">
                        <a href="#"><i class="fa fa-weibo"></i></a>
                        <a href="#"><i class="fa fa-wechat"></i></a>
                        <a href="#"><i class="fa fa-qq"></i></a>
                        <a href="#"><i class="fa fa-envelope"></i></a>
                    </div>
                </div>
                <div class="col-md-3 mb-4">
                    <h3 class="footer-title"><i class="fa fa-link"></i> 快速链接</h3>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 全部商品</a>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 限时特惠</a>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 新品上市</a>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 热卖榜单</a>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 品牌专区</a>
                </div>
                <div class="col-md-3 mb-4">
                    <h3 class="footer-title"><i class="fa fa-headphones"></i> 客户服务</h3>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 购物指南</a>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 支付方式</a>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 配送服务</a>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 退换货政策</a>
                    <a href="#" class="footer-link"><i class="fa fa-angle-right"></i> 常见问题</a>
                </div>
                <div class="col-md-3 mb-4">
                    <h3 class="footer-title"><i class="fa fa-mobile"></i> 联系我们</h3>
                    <p class="text-sm text-muted mb-1"><i class="fa fa-phone mr-2"></i> 400-123-4567</p>
                    <p class="text-sm text-muted mb-1"><i class="fa fa-envelope mr-2"></i> service@example.com</p>
                    <p class="text-sm text-muted mb-1"><i class="fa fa-map-marker mr-2"></i> 北京市朝阳区科技园A座10层</p>
                    <p class="text-sm text-muted"><i class="fa fa-clock-o mr-2"></i> 周一至周日 9:00-21:00</p>
                </div>
            </div>
        </div>
        <div class="copyright">
            <div class="container">
                <p>&copy; 2023 现代智能收银系统 版权所有 | 京ICP备12345678号</p>
            </div>
        </div>
    </footer>
    
    <!-- 引入Bootstrap JS -->
    <script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
    <!-- 自定义脚本 -->
    <script>
        // 等待页面加载完成
        document.addEventListener('DOMContentLoaded', function() {
            // 轮播图初始化
            const carousel = new bootstrap.Carousel(document.getElementById('homeCarousel'), {
                interval: 5000,
                wrap: true
            });
            
            // 收藏按钮交互
            const favoriteButtons = document.querySelectorAll('.favorite-btn');
            favoriteButtons.forEach(button => {
                button.addEventListener('click', function() {
                    this.classList.toggle('active');
                    const heartIcon = this.querySelector('i');
                    if (heartIcon.classList.contains('fa-heart-o')) {
                        heartIcon.classList.remove('fa-heart-o');
                        heartIcon.classList.add('fa-heart');
                    } else {
                        heartIcon.classList.remove('fa-heart');
                        heartIcon.classList.add('fa-heart-o');
                    }
                });
            });
            
            // 加入购物车按钮交互
            const addToCartButtons = document.querySelectorAll('.add-to-cart-btn');
            addToCartButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const originalText = this.textContent;
                    this.innerHTML = '<i class="fa fa-check"></i> 已加入';
                    this.classList.add('bg-success');
                    this.classList.remove('bg-primary');
                    
                    setTimeout(() => {
                        this.innerHTML = originalText;
                        this.classList.remove('bg-success');
                        this.classList.add('bg-primary');
                    }, 2000);
                });
            });
            
            // 搜索框交互
            const searchInput = document.querySelector('.search-input');
            const searchBtn = document.querySelector('.search-btn');
            
            searchBtn.addEventListener('click', function() {
                if (searchInput.value.trim()) {
                    alert(`搜索商品: ${searchInput.value}`);
                    // 在实际应用中，这里会跳转到搜索结果页面
                }
            });
            
            searchInput.addEventListener('keypress', function(e) {
                if (e.key === 'Enter') {
                    searchBtn.click();
                }
            });
        });
    </script>
</body>
</html>